Skip to content

feat(cli): show startup progress before TUI#36369

Closed
H-TTTTT wants to merge 1 commit into
anomalyco:v2from
H-TTTTT:feat/v2-startup-progress
Closed

feat(cli): show startup progress before TUI#36369
H-TTTTT wants to merge 1 commit into
anomalyco:v2from
H-TTTTT:feat/v2-startup-progress

Conversation

@H-TTTTT

@H-TTTTT H-TTTTT commented Jul 11, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #36195

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

V2 can spend several seconds resolving or restarting its background service and loading the initial location before the full-screen renderer exists. During that time the terminal currently looks frozen.

This starts the existing timeline footer after 500 ms, keeps it visible through the initial API preflight, and explicitly releases terminal ownership before the TUI renderer starts. Fast startup creates no renderer or output. Non-TTY launches retain the existing plain stderr diagnostics, and explicit --server launches keep their current behavior.

The handoff also waits for in-flight timeline creation and cleanup. If terminal ownership cannot be released, startup fails instead of allowing two renderers to compete for stdin/stdout.

How did you verify your code works?

  • bun test src/ui/startup.test.ts: 12 passed
  • bun test test/app-lifecycle.test.tsx: 5 passed
  • Full TUI suite: 230 passed, 1 skipped
  • Monorepo typecheck: 31/31 packages passed
  • Repository lint: 0 errors
  • PTY smoke tests covered both fast and delayed startup paths

Screenshots / recordings

PTY smoke testing confirmed that the existing split-footer renderer shows Starting OpenCode... only after the delay and is destroyed before the full TUI renderer starts.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@H-TTTTT

H-TTTTT commented Jul 12, 2026

Copy link
Copy Markdown
Author

Closing this implementation because the current v2 startup path has been superseded by #36448, #36455, and #36475. Those changes now own the update/version-mismatch renderer handoff. Rebasing this branch as-is would create competing terminal renderers and would regress the newer TuiConfig.load() flow. The generic delayed progress behavior for ordinary slow startup remains useful, but it should be implemented as a narrow follow-up on top of the current single-renderer handoff architecture rather than preserving this branch design. The existing focused tests still pass (12 startup and 5 lifecycle tests), and the branch is being kept for reference.

@H-TTTTT H-TTTTT closed this Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant